package com.oscar.ehome.presenter;

import android.util.Log;

import com.oscar.ehome.bean.UsersBean;
import com.oscar.ehome.bean.pagebean.AppListBean;
import com.oscar.ehome.bean.pagebean.BaoDanKehuBean;
import com.oscar.ehome.bean.pagebean.BaoDanTiaoBean;
import com.oscar.ehome.bean.pagebean.DaKaInfoBean;
import com.oscar.ehome.bean.pagebean.DaKaXiqngQingBean;

import com.oscar.ehome.bean.pagebean.DuDaoBean;
import com.oscar.ehome.bean.pagebean.DuDaoLieBiaoBean;
import com.oscar.ehome.bean.pagebean.DuDaoXiangQingBean;
import com.oscar.ehome.bean.pagebean.DuDaoZaohuiShuJU;
import com.oscar.ehome.bean.pagebean.HdBean;
import com.oscar.ehome.bean.pagebean.HuokeBean;
import com.oscar.ehome.bean.pagebean.InsuranceBean;
import com.oscar.ehome.bean.pagebean.InuranceMessageBean;
import com.oscar.ehome.bean.pagebean.MemberBean;
import com.oscar.ehome.bean.pagebean.MingpianBean;
import com.oscar.ehome.bean.pagebean.PageListBean;
import com.oscar.ehome.bean.pagebean.PageMessageBean;
import com.oscar.ehome.bean.pagebean.ShouyeOFOBean;
import com.oscar.ehome.bean.pagebean.ShuJuHuixianBean;
import com.oscar.ehome.bean.pagebean.SignNameBean;
import com.oscar.ehome.bean.pagebean.StudyBean;
import com.oscar.ehome.bean.pagebean.StudyDetialBean;

import com.oscar.ehome.bean.pagebean.SubBaoDanShuJuBEan;
import com.oscar.ehome.bean.pagebean.TongJiMessageBean;
import com.oscar.ehome.bean.pagebean.WorkLogBean;
import com.oscar.ehome.bean.pagebean.WorkMessageBean;
import com.oscar.ehome.bean.pagebean.XiaoXiFinalBean;
import com.oscar.ehome.bean.pagebean.XiaoXiXiangQingBean;
import com.oscar.ehome.bean.pagebean.XuanXiangShuJuBean;
import com.oscar.ehome.bean.pagebean.XueXiFinalBean;
import com.oscar.ehome.bean.pagebean.XueXiListBean;
import com.oscar.ehome.bean.pagebean.XueXiMessageBean;

import com.oscar.ehome.bean.pagebean.YeJiListBean;
import com.oscar.ehome.bean.pagebean.YeJiXiangQingBean;
import com.oscar.ehome.bean.pagebean.ZaoHuiList;
import com.oscar.ehome.bean.pagebean.tuanduiBean;
import com.oscar.ehome.bean.pagebean.xuexifenleiBean;
import com.oscar.ehome.bean.setbean.FeedBackBean;
import com.oscar.ehome.bean.setbean.TokenBean;
import com.oscar.ehome.model.HttpModel;
import com.oscar.ehome.model.HttpModelImple;
import com.oscar.ehome.model.OnHttpListener;
import com.oscar.ehome.view.pageview.YeJiChaXunXiangQing;
import com.oscar.ehome.view.pageview.view.AppListView;
import com.oscar.ehome.view.pageview.view.BannerView;
import com.oscar.ehome.view.pageview.view.BaoDanGeRenView;
import com.oscar.ehome.view.pageview.view.BaoDanKeHuView;
import com.oscar.ehome.view.pageview.view.DakaXiangQingView;

import com.oscar.ehome.view.pageview.view.DuDaoLieBiaoView;
import com.oscar.ehome.view.pageview.view.DuDaoView;
import com.oscar.ehome.view.pageview.view.DuDaoXiangQingView;
import com.oscar.ehome.view.pageview.view.HdView;
import com.oscar.ehome.view.pageview.view.HuokeView;
import com.oscar.ehome.view.pageview.view.InsuranceView;
import com.oscar.ehome.view.pageview.view.InuranceListView;
import com.oscar.ehome.view.pageview.view.JuBaoView;
import com.oscar.ehome.view.pageview.view.MembersListView;
import com.oscar.ehome.view.pageview.view.MingpianView;
import com.oscar.ehome.view.pageview.view.PageBannerView;
import com.oscar.ehome.view.pageview.view.SaveAppListView;
import com.oscar.ehome.view.pageview.view.StudyDetialView;
import com.oscar.ehome.view.pageview.view.StudyView;
import com.oscar.ehome.view.pageview.view.StudyguoduView;
import com.oscar.ehome.view.pageview.view.TeamCountNewView;
import com.oscar.ehome.view.pageview.view.XiaoXiXiangQingView;
import com.oscar.ehome.view.pageview.view.XueXiFinalView;
import com.oscar.ehome.view.pageview.view.XueXiListView;
import com.oscar.ehome.view.pageview.view.YaoQingView;
import com.oscar.ehome.view.pageview.view.YeJiChaXunView;
import com.oscar.ehome.view.pageview.view.YejiChaXunXiangQingView;
import com.oscar.ehome.view.pageview.view.baodanshujuView;
import com.oscar.ehome.view.pageview.view.xiaoxiFinalView;


import java.util.List;


/**
 * Created by oscar
 * author: MengWanhe
 * date: On 2017/7/4
 * 首页轮播图
 */

public class PagePresenter extends BasePresenter {

    HttpModel httpModel;
private BannerView baodanxiugaiview;
   private PageBannerView bannerView;
    private StudyView studyView;
    private HdView hdView;
    private StudyDetialView detialView;
    private MembersListView membersListView;
    private AppListView appListView;
    private SaveAppListView appView;
    private InsuranceView insuranceView;
    private InuranceListView inuranceListView;
    private HuokeView huokeView;
    private TeamCountNewView dakaview;
    private DakaXiangQingView xiangwiqngview;
    private XiaoXiXiangQingView xiaoxixiangqing;
    private xiaoxiFinalView xiaoxiFinalView;
    private StudyguoduView xuexiguodu;
    private XueXiListView xuexitongjiview;
    private XueXiFinalView xuexifinalview;
    private DuDaoView duDaoView;
    private DuDaoXiangQingView dudaoxiangqingview;
    private DuDaoLieBiaoView dudaoliebiaoview;
    private JuBaoView jubaoview;
    private YaoQingView yaoqingview;
    private MingpianView mingpianview;
    private BaoDanKeHuView bandankehuview;
    private baodanshujuView baodanxuanxiang;
    private BaoDanGeRenView baodangerenview;
    private YeJiChaXunView yejichaxunlistview;
    private YejiChaXunXiangQingView yejixiangqingview;
    public PagePresenter(YejiChaXunXiangQingView yejixiangqingview) {
        this.yejixiangqingview = yejixiangqingview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(YeJiChaXunView yejichaxunlistview) {
        this.yejichaxunlistview = yejichaxunlistview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter( BaoDanGeRenView baodangerenview) {
        this.baodangerenview = baodangerenview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter( baodanshujuView baodanxuanxiang) {
        this.baodanxuanxiang = baodanxuanxiang;
        httpModel = new HttpModelImple();
    }
    public PagePresenter( BaoDanKeHuView bandankehuview) {
        this.bandankehuview = bandankehuview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter( MingpianView mingpianview) {
        this.mingpianview = mingpianview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(YaoQingView yaoqingview) {
        this.yaoqingview = yaoqingview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(JuBaoView jubaoview) {
        this.jubaoview = jubaoview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(DuDaoLieBiaoView dudaoliebiaoview) {
        this.dudaoliebiaoview = dudaoliebiaoview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(DuDaoXiangQingView dudaoxiangqingview) {
        this.dudaoxiangqingview = dudaoxiangqingview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(DuDaoView dudaoview) {
        this.duDaoView = dudaoview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(XueXiFinalView xuexifinalview) {
        this.xuexifinalview = xuexifinalview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(XueXiListView xuexitongjiview) {
        this.xuexitongjiview = xuexitongjiview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(BannerView baodanxiugaiview) {
        this.baodanxiugaiview = baodanxiugaiview;
        httpModel = new HttpModelImple();
    }

    public PagePresenter(PageBannerView bannerView) {
        this.bannerView = bannerView;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(StudyguoduView xuexiguodu) {
        this.xuexiguodu = xuexiguodu;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(StudyView studyView) {
        this.studyView = studyView;
        httpModel = new HttpModelImple();
    }

    public PagePresenter(HdView hdView) {
        this.hdView = hdView;
        httpModel = new HttpModelImple();
    }

    public PagePresenter(StudyDetialView detialView) {
        this.detialView = detialView;
        httpModel = new HttpModelImple();
    }

    public PagePresenter(MembersListView membersListView) {
        this.membersListView = membersListView;
        httpModel = new HttpModelImple();
    }

    public PagePresenter(AppListView appListView) {
        this.appListView = appListView;
        httpModel = new HttpModelImple();
    }

    public PagePresenter(SaveAppListView appView) {
        this.appView = appView;
        httpModel = new HttpModelImple();
    }

    public PagePresenter(InsuranceView insuranceView) {
        this.insuranceView = insuranceView;
        httpModel = new HttpModelImple();
    }

    public PagePresenter(InuranceListView inuranceListView) {
        this.inuranceListView = inuranceListView;
        httpModel = new HttpModelImple();
    }

    public PagePresenter(HuokeView huokeView) {
        this.huokeView = huokeView;
        httpModel = new HttpModelImple();
    }

    public PagePresenter(TeamCountNewView dakaview) {
        this.dakaview = dakaview;
        httpModel = new HttpModelImple();
    }

    public PagePresenter(DakaXiangQingView xiangqingview) {
        this.xiangwiqngview = xiangqingview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(XiaoXiXiangQingView xiangqingview) {
        this.xiaoxixiangqing = xiangqingview;
        httpModel = new HttpModelImple();
    }
    public PagePresenter(xiaoxiFinalView xiangqingview) {
        this.xiaoxiFinalView = xiangqingview;
        httpModel = new HttpModelImple();
    }


    //huoquyejixiangqing

    /**
     * 意见反馈
     */
    public void getyejixiangqing(String token, String id,String data) {
        httpModel.getyejixiangqing(token,id,data,new OnHttpListener<YeJiXiangQingBean>() {
            @Override
            public void onSuccess(YeJiXiangQingBean obj) {
                if ( yejixiangqingview!= null)
                    yejixiangqingview.getyejixiangqing(obj);
            }

            @Override
            public void onError(String msg) {
                yejixiangqingview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (yejixiangqingview != null)
                    yejixiangqingview.erroy();
            }
        });


    }

    public void deletebaodan(String token, String id) {
        httpModel.deletebaodan(token,id,new OnHttpListener<String>() {
            @Override
            public void onSuccess(String obj) {
                if ( baodanxiugaiview!= null)
                    baodanxiugaiview.deletebaodan(obj);
            }

            @Override
            public void onError(String msg) {
                baodanxiugaiview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (baodanxiugaiview != null)
                    baodanxiugaiview.erroy();
            }
        });


    }
    /**
     * 意见反馈
     */
    public void getbaodangerenshuju(String token, String jiatingid) {
        httpModel.getbaodangerenshuju(token,jiatingid,new OnHttpListener<ShuJuHuixianBean>() {
            @Override
            public void onSuccess(ShuJuHuixianBean obj) {
                if ( baodangerenview!= null)
                    baodangerenview.getbaodangerenyiyoushuju(obj);
            }

            @Override
            public void onError(String msg) {
                baodangerenview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (baodangerenview != null)
                    baodangerenview.erroy();
            }
        });


    }
    /**
     * 提交个人信息
     */
    public void subbaodangereninfo(String token, String jsonchuan,String  familyid) {
        httpModel.subbaodangereninfo(token,jsonchuan,familyid,new OnHttpListener<String>() {
            @Override
            public void onSuccess(String result ) {
                if ( baodangerenview!= null)
                    baodangerenview.subbaodanshuju(result);
            }

            @Override
            public void onError(String msg) {
                baodangerenview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (baodangerenview != null)
                    baodangerenview.erroy();
            }
        });


    }
    /**
     * 意见反馈
     */
    public void getBaoDanxuanXiang(String token, String type) {
        httpModel.getbaodanxuanxiang(token,type,new OnHttpListener<XuanXiangShuJuBean>() {
            @Override
            public void onSuccess(XuanXiangShuJuBean obj) {
                if ( baodanxuanxiang!= null)
                    baodanxuanxiang.getxuanxiangshuju(obj);
            }

            @Override
            public void onError(String msg) {
                baodanxuanxiang.erry(msg);
            }

            @Override
            public void onFailure() {
                if (baodanxuanxiang != null)
                    baodanxuanxiang.erroy();
            }
        });


    }
    /**
     * 意见反馈
     */
    public void getyiyoushuju(String token, String jiatingid,String xiugaiid) {
        httpModel.getyiyoushuju(token,jiatingid,xiugaiid,new OnHttpListener<SubBaoDanShuJuBEan>() {
            @Override
            public void onSuccess(SubBaoDanShuJuBEan obj) {
                if ( baodanxuanxiang!= null)
                    baodanxuanxiang.huoquyiyoushuju(obj);
            }

            @Override
            public void onError(String msg) {
                baodanxuanxiang.erry(msg);
            }

            @Override
            public void onFailure() {
                if (baodanxuanxiang != null)
                    baodanxuanxiang.erroy();
            }
        });


    }
    public void subbaodanshuju(String token, String jsonchuan,String familyid,String xiugaiid) {
        httpModel.subbaodanshuju(token,jsonchuan,familyid,xiugaiid,new OnHttpListener<BaoDanTiaoBean>() {
            @Override
            public void onSuccess(BaoDanTiaoBean obj) {
                if ( baodanxuanxiang!= null)
                    baodanxuanxiang.subbaodanshuju(obj);
            }

            @Override
            public void onError(String msg) {
                baodanxuanxiang.erry(msg);
            }

            @Override
            public void onFailure() {
                if (baodanxuanxiang != null)
                    baodanxuanxiang.erroy();
            }
        });


    }
    /**
     * 意见反馈
     */
    public void getBaoDanKeHu(String token, String pageSize, String pageNo) {
        httpModel.getBaodankehu(token,pageSize, pageNo,new OnHttpListener<BaoDanKehuBean>() {
            @Override
            public void onSuccess(BaoDanKehuBean obj) {
                if ( bandankehuview!= null)
                    bandankehuview.getBaoDanKeHuList(obj);
            }

            @Override
            public void onError(String msg) {
                bandankehuview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (bandankehuview != null)
                    bandankehuview.erroy();
            }
        });


    }
    public void deleteitem(String token, String familyid) {
        httpModel.deleteitem(token,familyid,new OnHttpListener<String>() {
            @Override
            public void onSuccess(String obj) {
                if ( bandankehuview!= null)
                    bandankehuview.deleteitem(obj);
            }

            @Override
            public void onError(String msg) {
                bandankehuview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (bandankehuview != null)
                    bandankehuview.erroy();
            }
        });


    }

    /**
     * 意见反馈
     */
    public void subjubao(String token, String imageStr, String complaintsName, String complaintsContent) {
        httpModel.subjubao(token, imageStr, complaintsName, complaintsContent, new OnHttpListener<FeedBackBean>() {
            @Override
            public void onSuccess(FeedBackBean obj) {
                if (jubaoview != null)
                    jubaoview.jubaofankui(obj);
            }

            @Override
            public void onError(String msg) {
                jubaoview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (jubaoview != null)
                    jubaoview.erroy();
            }
        });


    }

    /**
     * 意见反馈
     */
    public void getmingpianinfo(String token) {
        httpModel.getyaoqinginfo(token,  new OnHttpListener<MingpianBean>() {
            @Override
            public void onSuccess(MingpianBean obj) {
                if (mingpianview != null)
                    mingpianview.getmingpianinfo(obj);
            }

            @Override
            public void onError(String msg) {
                mingpianview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (mingpianview != null)
                    mingpianview.erroy();
            }
        });


    }
    public void getshouyemingpianinfo(String token) {
        httpModel.getyaoqinginfo(token,  new OnHttpListener<MingpianBean>() {
            @Override
            public void onSuccess(MingpianBean obj) {
                if (bannerView != null)
                    bannerView.getyaoqinginfo(obj);
            }

            @Override
            public void onError(String msg) {
                bannerView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (bannerView != null)
                    bannerView.erroy();
            }
        });


    }

    public void  mingpianfankui(String token,String name, String params,String image,String  qrCode) {
        httpModel.submingpian(token, name, params,image,qrCode,  new OnHttpListener<FeedBackBean>() {
            @Override
            public void onSuccess(FeedBackBean obj) {
                if (mingpianview != null)
                    mingpianview.mingpianfankui(obj);
            }

            @Override
            public void onError(String msg) {
                mingpianview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (mingpianview != null)
                    mingpianview.erroy();
            }
        });


    }
    public void yaoqingfankui(String token,String name, String introduction,String time ,String image,String  qrCode) {
        httpModel.subyaoqing(token, name, introduction,time,image,qrCode,  new OnHttpListener<FeedBackBean>() {
            @Override
            public void onSuccess(FeedBackBean obj) {
                if (yaoqingview != null)
                    yaoqingview.yaoqingfankui(obj);
            }

            @Override
            public void onError(String msg) {
                yaoqingview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (yaoqingview != null)
                    yaoqingview.erroy();
            }
        });


    }
    public void getmingpiantoken() {
        httpModel.getUploadToken(new OnHttpListener<TokenBean>() {

            @Override
            public void onSuccess(TokenBean obj) {
                if (mingpianview != null)
                    mingpianview.getmingpiantoken(obj);
            }

            @Override
            public void onError(String msg) {
                if (mingpianview != null)
                    mingpianview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (mingpianview != null)
                    mingpianview.erroy();
            }
        });

    }
    public void getyaoqingtoken() {
        httpModel.getUploadToken(new OnHttpListener<TokenBean>() {

            @Override
            public void onSuccess(TokenBean obj) {
                if (yaoqingview != null)
                    yaoqingview.getyaoqingtoken(obj);
            }

            @Override
            public void onError(String msg) {
                if (yaoqingview != null)
                    yaoqingview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (yaoqingview != null)
                    yaoqingview.erroy();
            }
        });

    }
    /**
     * xuexiguodu   daiwanshan
     */
    public void getjubaotoken() {
        httpModel.getUploadToken(new OnHttpListener<TokenBean>() {

            @Override
            public void onSuccess(TokenBean obj) {
                if (jubaoview != null)
                    jubaoview.getjubaotoken(obj);
            }

            @Override
            public void onError(String msg) {
                if (jubaoview != null)
                    jubaoview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (jubaoview != null)
                    jubaoview.erroy();
            }
        });

    }

    /**
     * xuexiguodu   daiwanshan
     */
    public void gettudyGuoDu(String token, String pageSize, String pageNo) {

        httpModel.gettudyGuoDu(token,  pageSize, pageNo,new OnHttpListener<xuexifenleiBean>() {
            @Override
            public void onSuccess(xuexifenleiBean obj) {

                if (xuexiguodu != null)
                    xuexiguodu.getxuexiguodulist(obj);
            }

            @Override
            public void onError(String msg) {
                if (xuexiguodu != null)
                    xuexiguodu.erry(msg);
            }

            @Override
            public void onFailure() {
                if (xuexiguodu != null)
                    xuexiguodu.erroy();
            }
        });
    }

    /**
     * 督导详情
     */
    public void getzaohuishangbao(String token,String number1,String number2,String number3) {

        httpModel.getzaohuishangbao(token,number1,number2,number3,new OnHttpListener<DuDaoZaohuiShuJU>() {
            @Override
            public void onSuccess(DuDaoZaohuiShuJU obj) {
                Log.e("dudao", "getDuDaoXiangQing: "+ "kaishi");
                if (dudaoxiangqingview != null)
                    dudaoxiangqingview.getzaohuishuju(obj);
            }

            @Override
            public void onError(String msg) {
                if (dudaoxiangqingview != null)
                    dudaoxiangqingview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (dudaoxiangqingview != null)
                    dudaoxiangqingview.erroy();
            }
        });
    }

    /**
     * 督导详情
     */
    public void getdangtianzaohui(String token) {

        httpModel.getdangtianzaohui(token,new OnHttpListener<DuDaoZaohuiShuJU>() {
            @Override
            public void onSuccess(DuDaoZaohuiShuJU obj) {
                Log.e("dudao", "getDuDaoXiangQing: "+ "kaishi");
                if (dudaoxiangqingview != null)
                    dudaoxiangqingview.getdangtianzaohui(obj);
            }

            @Override
            public void onError(String msg) {
                if (dudaoxiangqingview != null)
                    dudaoxiangqingview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (dudaoxiangqingview != null)
                    dudaoxiangqingview.erroy();
            }
        });
    }
    /**
     * 督导详情
     */
    public void getdudaoliebiao(String token) {

        httpModel.getdudaoliebiao(token,new OnHttpListener<DuDaoLieBiaoBean>() {
            @Override
            public void onSuccess(DuDaoLieBiaoBean obj) {
                Log.e("dudao", "getDuDaoXiangQing: "+ "kaishi");
                if (dudaoliebiaoview != null)
                    dudaoliebiaoview.getDuDaoLieBiao(obj);
            }

            @Override
            public void onError(String msg) {
                if (dudaoliebiaoview != null)
                    dudaoliebiaoview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (dudaoliebiaoview != null)
                    dudaoliebiaoview.erroy();
            }
        });
    }
    /**
     * 督导详情
     */
    public void getdangqiandudao(String token) {

        httpModel.getdangtiandudao(token,new OnHttpListener<DuDaoXiangQingBean>() {
                    @Override
                    public void onSuccess(DuDaoXiangQingBean obj) {
                        Log.e("dudao", "getDuDaoXiangQing: "+ "kaishi");
                        if (dudaoxiangqingview != null)
                            dudaoxiangqingview.getdangqiandudao(obj);
                    }

                    @Override
                    public void onError(String msg) {
                        if (dudaoxiangqingview != null)
                            dudaoxiangqingview.erry(msg);
                    }

                    @Override
                    public void onFailure() {
                        if (dudaoxiangqingview != null)
                            dudaoxiangqingview.erroy();
                    }
                });
    }
    /**
     * 督导详情
     */
    public void getdudaoxiangqing(String token,String ticketMain,String bodyMain, String  guestsPresent,String transactionMain,String mainList,
                                  String doubleIncomeMainBody,String transactionNumber,
                                  String orderNumber,String preminu,String voucherNumber,String referralNumber,String listNumber,String increaseNumber) {

        httpModel.getdudaoxiangqing(token, ticketMain,bodyMain,guestsPresent,transactionMain,mainList,doubleIncomeMainBody,transactionNumber,
                orderNumber, preminu ,voucherNumber,referralNumber,listNumber,increaseNumber,new OnHttpListener<DuDaoXiangQingBean>() {
            @Override
            public void onSuccess(DuDaoXiangQingBean obj) {
                Log.e("dudao", "getDuDaoXiangQing: "+ "kaishi");
                if (dudaoxiangqingview != null)
                    dudaoxiangqingview.getDuDaoXiangQing(obj);
            }

            @Override
            public void onError(String msg) {
                Log.e("dudao", "getDuDaoXiangQing: "+ msg);
                if (dudaoxiangqingview != null)
                    dudaoxiangqingview.erry(msg);
            }

            @Override
            public void onFailure() {

                if (dudaoxiangqingview != null)
                    dudaoxiangqingview.erroy();
            }
        });
    }






    public void xuexifinal(String token, String pageSize, String pageNo,String id) {

        httpModel.getxuexifinalMessage(token,pageSize,pageNo,id, new OnHttpListener<XueXiFinalBean>() {
            @Override
            public void onSuccess(XueXiFinalBean obj) {

                if (xuexifinalview != null)
                    xuexifinalview.getxuexifinalMessage(obj);
            }

            @Override
            public void onError(String msg) {
                if (xuexifinalview != null)
                    xuexifinalview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (xuexifinalview != null)
                    xuexifinalview.erroy();
            }
        });
    }

    public void xiaoxifinal(String token, String pageSize, String pageNo,String id) {

        httpModel.getxiaoxifinalMessage(token,pageSize,pageNo,id, new OnHttpListener<XiaoXiFinalBean>() {
            @Override
            public void onSuccess(XiaoXiFinalBean obj) {

                if (xiaoxiFinalView != null)
                    xiaoxiFinalView.getxiaoxifinalMessage(obj);
            }

            @Override
            public void onError(String msg) {
                if (xiaoxiFinalView != null)
                    xiaoxiFinalView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (xiaoxiFinalView != null)
                    xiaoxiFinalView.erroy();
            }
        });
    }
    /**
     * 获取打卡统计xiangqing
     */
    public void xiaoxitongjixiangqing(String token, String pageSize, String pageNo) {

            httpModel.getxiaoxilistMessage(token,  pageSize, pageNo,new OnHttpListener<XiaoXiXiangQingBean>() {
                @Override
                public void onSuccess(XiaoXiXiangQingBean obj) {

                    if (xiaoxixiangqing != null)
                        xiaoxixiangqing.getxiaoxilistMessage(obj);
                }

                @Override
                public void onError(String msg) {
                    if (xiaoxixiangqing != null)
                        xiaoxixiangqing.erry(msg);
                }

                @Override
                public void onFailure() {
                    if (xiaoxixiangqing != null)
                        xiaoxixiangqing.erroy();
                }
            });
        }
    /**
     * 获取打卡统计xiangqing
     */
    public void xuexitongjixiangqing(String token, String pageSize, String pageNo) {

        httpModel.getxxuexixilistMessage(token,  pageSize, pageNo,new OnHttpListener<XueXiListBean>() {
            @Override
            public void onSuccess(XueXiListBean obj) {

                if (xuexitongjiview != null)
                    xuexitongjiview.getStudylist(obj);
            }

            @Override
            public void onError(String msg) {
                if (xuexitongjiview != null)
                    xuexitongjiview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (xuexitongjiview != null)
                    xuexitongjiview.erroy();
            }
        });
    }


    /**
     * 获取打卡统计xiangqing
     */
    public void dakatongjixiangqing(String token, String pageSize, String pageNo,String punchcardTime,String times) {
        httpModel.getDaKaXqMessage(token,  pageSize, pageNo,punchcardTime,times,new OnHttpListener<DaKaXiqngQingBean>() {
            @Override
            public void onSuccess(DaKaXiqngQingBean obj) {

                if (xiangwiqngview != null)
                    xiangwiqngview.getXiangQingMessage(obj);
            }

            @Override
            public void onError(String msg) {
                if (xiangwiqngview != null)
                    xiangwiqngview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (xiangwiqngview != null)
                    xiangwiqngview.erroy();
            }
        });
    }
    /**
     * 获取tuanduitongji
     */
    public void rtuanduitongji(String token) {
        httpModel.getTuanduitongji(token, new OnHttpListener<tuanduiBean>() {
            @Override
            public void onSuccess(tuanduiBean obj) {

                if (dakaview != null)
                    dakaview.gettuanduiMessage(obj);
            }

            @Override
            public void onError(String msg) {
                if (dakaview != null)
                    dakaview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (dakaview != null)
                    dakaview.erroy();
            }
        });
    }



    public void xiaoxitongji(String token) {
        httpModel.getxiaoxiMessage(token, new OnHttpListener<TongJiMessageBean>() {
            @Override
            public void onSuccess(TongJiMessageBean obj) {

                if (dakaview != null)
                    dakaview.getxiaoxitongji(obj);
            }

            @Override
            public void onError(String msg) {
                if (dakaview != null)
                    dakaview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (dakaview != null)
                    dakaview.erroy();
            }
        });
    }

    public void xuexitongji(String token) {
        httpModel.getxiuexiMessage(token, new OnHttpListener<XueXiMessageBean>() {
            @Override
            public void onSuccess(XueXiMessageBean obj) {

                if (dakaview!= null)
                    dakaview.getxuexitongji(obj);
            }

            @Override
            public void onError(String msg) {
                if (dakaview != null)
                    dakaview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (dakaview != null)
                    dakaview.erroy();
            }
        });
    }
    /**
     * 获取打卡统计
     */
    public void dakatongji(String token) {
        httpModel.getDaKaMessage(token, new OnHttpListener<DaKaInfoBean>() {
            @Override
            public void onSuccess(DaKaInfoBean obj) {

                if (dakaview != null)
                    dakaview.getDaKaMessage(obj);
            }

            @Override
            public void onError(String msg) {
                if (dakaview != null)
                    dakaview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (dakaview != null)
                    dakaview.erroy();
            }
        });
    }

    /**
     * 获取banner图
     */
    public void banners(String token) {
        httpModel.getBannerImage(token, new OnHttpListener<PageMessageBean>() {
            @Override
            public void onSuccess(PageMessageBean obj) {

                if (bannerView != null)
                    bannerView.getBannerMessage(obj);
            }

            @Override
            public void onError(String msg) {
                if (bannerView != null)
                    bannerView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (bannerView != null)
                    bannerView.erroy();
            }
        });
    }
    public void getOFO(String token) {
        httpModel.getOFO(token, new OnHttpListener<ShouyeOFOBean>() {
            @Override
            public void onSuccess(ShouyeOFOBean obj) {

                if (bannerView != null)
                    bannerView.getOFO(obj);
            }

            @Override
            public void onError(String msg) {
                if (bannerView != null)
                    bannerView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (bannerView != null)
                    bannerView.erroy();
            }
        });
    }
    /**
     * 获取获客列表
     */
    public void getHuokeList(String token, String pageNo, String pageSize) {
        httpModel.getHuokeList(token, pageNo, pageSize, new OnHttpListener<HuokeBean>() {
            @Override
            public void onSuccess(HuokeBean obj) {
                if (huokeView != null)
                    huokeView.getHuokeList(obj);
            }

            @Override
            public void onError(String msg) {
                if (huokeView != null)
                    huokeView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (huokeView != null)
                    huokeView.erroy();
            }
        });
    }

    /**
     * 获取首页列表
     */
    public void getPageList(String token) {
        httpModel.getPageList(token, new OnHttpListener<PageListBean>() {
            @Override
            public void onSuccess(PageListBean obj) {
                if (bannerView != null)
                    bannerView.getPageList(obj);
            }

            @Override
            public void onError(String msg) {
                if (bannerView != null)
                    bannerView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (bannerView != null)
                    bannerView.erroy();
            }
        });
    }


    /**
     * 首页获取个人信息
     */
    public void getUser(String token) {
        httpModel.getUsers(token, new OnHttpListener<UsersBean>() {
            @Override
            public void onSuccess(UsersBean obj) {
                if (bannerView != null)
                    bannerView.getPageUser(obj);
            }

            @Override
            public void onError(String msg) {
                if (bannerView != null)
                    bannerView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (bannerView != null)
                    bannerView.erroy();
            }
        });
    }

    /**
     * 获取应用
     */
    public void getAppactions(String token) {
        httpModel.getAppaltions(token, new OnHttpListener<List<String>>() {
            @Override
            public void onSuccess(List<String> obj) {
                if (bannerView != null)
                    bannerView.getAPPactionMessage(obj);
            }

            @Override
            public void onError(String msg) {
                if (bannerView != null)
                    bannerView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (bannerView != null)
                    bannerView.erroy();
            }
        });
    }
/*
获取业绩列表
 */

    public void getyejilist(String token, String pageSize, String pageNo,  String data) {
        httpModel.getyejilist(token, pageSize, pageNo, data, new OnHttpListener<YeJiListBean>() {
            @Override
            public void onSuccess(YeJiListBean obj) {
                if (yejichaxunlistview != null)
                    yejichaxunlistview.getYeLJiList(obj);
            }

            @Override
            public void onError(String msg) {
                if (yejichaxunlistview != null)
                    yejichaxunlistview.erry(msg);
            }

            @Override
            public void onFailure() {
                if (yejichaxunlistview != null)
                    yejichaxunlistview.erroy();
            }
        });
    }
    /**
     * 获取学习列表
     */
    public void getStudyList(String token, String pageSize, String pageNo, String folder,String query) {
        httpModel.getStudyList(token, pageSize, pageNo, folder,query, new OnHttpListener<StudyBean>() {
            @Override
            public void onSuccess(StudyBean obj) {
                if (studyView != null)
                    studyView.getstudyList(obj);
            }

            @Override
            public void onError(String msg) {
                if (studyView != null)
                    studyView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (studyView != null)
                    studyView.erroy();
            }
        });
    }

    /**
     * 获取学习详情
     */
    public void getStudyDetial(String token, String id) {
        httpModel.getStudyDetial(token, id, new OnHttpListener<StudyDetialBean>() {
            @Override
            public void onSuccess(StudyDetialBean obj) {
                if (detialView != null)
                    detialView.getstudyDetail(obj);
            }

            @Override
            public void onError(String msg) {
                if (detialView != null)
                    detialView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (detialView != null)
                    detialView.erroy();
            }
        });
    }

    /**
     * 保存学习记录
     */
    public void saveLearn(String token, String learnId, String startTime, String endTime, String watchTime) {
        httpModel.saveLearn(token, learnId, startTime, endTime, watchTime, new OnHttpListener<String>() {
            @Override
            public void onSuccess(String obj) {
                if (detialView != null)
                    detialView.saveLearn(obj);
            }

            @Override
            public void onError(String msg) {
                if (detialView != null)
                    detialView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (detialView != null)
                    detialView.erroy();
            }
        });
    }

    /**
     * 获取活动列表
     */
    public void hdlist(String token, String pageNo, String pageSize, String query) {
        httpModel.getHdList(token, pageNo, pageSize, query, new OnHttpListener<HdBean>() {
            @Override
            public void onSuccess(HdBean obj) {
                if (hdView != null)
                    hdView.getHdList(obj);
            }

            @Override
            public void onError(String msg) {
                if (hdView != null)
                    hdView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (hdView != null)
                    hdView.erroy();
            }
        });
    }


    public void saveEventSign(String token, String userId, String eventId) {
        httpModel.saveEventSign(token, userId, eventId, new OnHttpListener<SignNameBean>() {

            @Override
            public void onSuccess(SignNameBean obj) {
                if (hdView != null)
                    hdView.saveEventSign(obj);
            }

            @Override
            public void onError(String msg) {
                if (hdView != null)
                    hdView.erry(msg);

            }

            @Override
            public void onFailure() {
                if (hdView != null)
                    hdView.erroy();

            }
        });
    }



    public void getMemberlist(String token, String status) {
        httpModel.getMemberList(token, status, new OnHttpListener<MemberBean>() {

            @Override
            public void onSuccess(MemberBean obj) {
                if (membersListView != null)
                    membersListView.getMembersList(obj);
            }

            @Override
            public void onError(String msg) {
                if (membersListView != null)
                    membersListView.erry(msg);

            }

            @Override
            public void onFailure() {
                if (membersListView != null)
                    membersListView.erroy();

            }
        });
    }


    public void getApplist(String token) {
        httpModel.getAppList(token, new OnHttpListener<AppListBean>() {

            @Override
            public void onSuccess(AppListBean obj) {
                if (appListView != null)
                    appListView.getAppList(obj);
            }

            @Override
            public void onError(String msg) {
                if (appListView != null)
                    appListView.erry(msg);

            }

            @Override
            public void onFailure() {
                if (appListView != null)
                    appListView.erroy();
            }
        });
    }

    public void saveApp(String token, String menuMobileIds) {
        httpModel.svaeAppa(token, menuMobileIds, new OnHttpListener<String>() {

            @Override
            public void onSuccess(String obj) {
                if (appView != null)
                    appView.saveApp(obj);
            }

            @Override
            public void onError(String msg) {
                if (appView != null)
                    appView.erry(msg);

            }

            @Override
            public void onFailure() {
                if (appView != null)
                    appView.erroy();
            }
        });
    }


    public void upload_insurance(String id, String companyName, String policyNumber, String policyStatus,
                                 String insuredPerson, String token, String insured, String beneficiaries,
                                 String transferBank, String transferAccountNumber, String productName,
                                 String underwritingTime, String annualPremium, String paymentPeriod,
                                 String guaranteePeriod, String insuredAmount, String insuranceDuty,
                                 String insuredPersonMobile) {
        httpModel.upload_insuranceMessage(id, companyName, policyNumber, policyStatus, insuredPerson, token, insured, beneficiaries,
                transferBank, transferAccountNumber, productName, underwritingTime, annualPremium, paymentPeriod,
                guaranteePeriod, insuredAmount, insuranceDuty, insuredPersonMobile, new OnHttpListener<String>() {

                    @Override
                    public void onSuccess(String obj) {
                        if (insuranceView != null)
                            insuranceView.upload_mesage(obj);
                    }

                    @Override
                    public void onError(String msg) {
                        if (insuranceView != null)
                            insuranceView.erry(msg);

                    }

                    @Override
                    public void onFailure() {
                        if (insuranceView != null)
                            insuranceView.erroy();
                    }
                });
    }

    public void getdudaolist(String token,String Datas) {
        httpModel.getdudaolist(token, Datas,new OnHttpListener<DuDaoBean>() {

                    @Override
                    public void onSuccess(DuDaoBean obj) {
                        if (duDaoView != null)
                            duDaoView.getDuDaoList(obj);
                    }

                    @Override
                    public void onError(String msg) {
                        if (duDaoView != null)
                            duDaoView.erry(msg);

                    }

                    @Override
                    public void onFailure() {
                        if (duDaoView != null)
                            duDaoView.erroy();
                    }
                });
    }

    public void getzaohuilist(String token,String Datas) {
        httpModel.getzaohuilist(token, Datas,new OnHttpListener<ZaoHuiList>() {

            @Override
            public void onSuccess(ZaoHuiList obj) {
                if (duDaoView != null)
                    duDaoView.getzaohuilist(obj);
            }

            @Override
            public void onError(String msg) {
                if (duDaoView != null)
                    duDaoView.erry(msg);

            }

            @Override
            public void onFailure() {
                if (duDaoView != null)
                    duDaoView.erroy();
            }
        });
    }

    public void upload_worklog(String id, String token, String content) {
        httpModel.upload_Worklog(id, token, content, new OnHttpListener<String>() {

            @Override
            public void onSuccess(String obj) {
                if (insuranceView != null)
                    insuranceView.upload_worklog(obj);
            }

            @Override
            public void onError(String msg) {
                if (insuranceView != null)
                    insuranceView.erry(msg);

            }

            @Override
            public void onFailure() {
                if (insuranceView != null)
                    insuranceView.erroy();
            }
        });
    }

    /**
     * 获取保险详情
     */
    public void getInsuranceDetial(String token, String id) {
        httpModel.InsuranceMesage(token, id, new OnHttpListener<InuranceMessageBean>() {
            @Override
            public void onSuccess(InuranceMessageBean obj) {
                if (insuranceView != null)
                    insuranceView.getInsuranceMessage(obj);
            }

            @Override
            public void onError(String msg) {
                if (insuranceView != null)
                    insuranceView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (insuranceView != null)
                    insuranceView.erroy();
            }
        });
    }

    /**
     * 获取日志详情
     */
    public void getWorklogDetial(String token, String id) {
        httpModel.WorkLogMesage(token, id, new OnHttpListener<WorkMessageBean>() {
            @Override
            public void onSuccess(WorkMessageBean obj) {
                if (insuranceView != null)
                    insuranceView.getWorkMessage(obj);
            }

            @Override
            public void onError(String msg) {
                if (insuranceView != null)
                    insuranceView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (insuranceView != null)
                    insuranceView.erroy();
            }
        });
    }

    /**
     * 获取保险列表
     */
    public void getbaoxianList(String token) {
        httpModel.InsuranceList(token, new OnHttpListener<InsuranceBean>() {
            @Override
            public void onSuccess(InsuranceBean obj) {
                if (inuranceListView != null)
                    inuranceListView.getInsuranceList(obj);
            }

            @Override
            public void onError(String msg) {
                if (inuranceListView != null)
                    inuranceListView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (inuranceListView != null)
                    inuranceListView.erroy();
            }
        });
    }

    /**
     * 获取日志列表
     */
    public void getWorkList(String token, String pageSize, String pageNo) {
        httpModel.WorkLogList(token, pageSize, pageNo, new OnHttpListener<WorkLogBean>() {
            @Override
            public void onSuccess(WorkLogBean obj) {
                if (inuranceListView != null)
                    inuranceListView.getWorkList(obj);
            }

            @Override
            public void onError(String msg) {
                if (inuranceListView != null)
                    inuranceListView.erry(msg);
            }

            @Override
            public void onFailure() {
                if (inuranceListView != null)
                    inuranceListView.erroy();
            }
        });
    }


    public void onDestory() {
        bannerView = null;
        studyView = null;
        hdView = null;
        detialView = null;
        membersListView = null;
        appListView = null;
        appView = null;
        insuranceView = null;
        inuranceListView = null;
        huokeView = null;
    }


}
